{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "# IntelliJ Platform UI\n",
    "\n",
    "This simple notebook presents how to run the Message Dialog within the currently running IDE in the current project."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {
    "collapsed": true
   },
   "source": "%use intellij-platform",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "import com.intellij.openapi.ui.Messages\n",
    "\n",
    "runInEdt {\n",
    "    Messages.showMessageDialog(\n",
    "        currentProject(),\n",
    "        \"This is a modal dialog message\",\n",
    "        \"Dialog Title\",\n",
    "        Messages.getInformationIcon()\n",
    "    )\n",
    "}"
   ],
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "The `currentProject` function provided by the Kotlin Notebook IntelliJ Platform integration returns a [`Project`](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/project/Project.java) instance that refers to the currently open project."
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Kotlin",
   "language": "kotlin",
   "name": "kotlin"
  },
  "language_info": {
   "name": "kotlin",
   "version": "2.2.20-dev-4982",
   "mimetype": "text/x-kotlin",
   "file_extension": ".kt",
   "pygments_lexer": "kotlin",
   "codemirror_mode": "text/x-kotlin",
   "nbconvert_exporter": ""
  },
  "ktnbPluginMetadata": {
   "sessionRunMode": "IDE_PROCESS"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
